use Flap qw/-m -s -w/;
eval 'use Plack::MIME';

sub{
    my $util = shift;
    my $r = ref $_[0] ? shift : do{ \(my $s = shift) };
    if($Plack::MIME::MIME_TYPES && $$r =~ /(\.\w+)\z/){
        my $m = $Plack::MIME::MIME_TYPES->{$1};
        return $m if $m;
    }
    #if(my $m = $os->qx('file -bi %path', $$r)){
    #    $m =~ tr/\n\r//d;
    #    return $m;
    #}
    undef;
};
